
<template>
	<!--
    	作者：1550495493@qq.com
    	时间：2019-08-13
    	描述：项目管理员-项目筛选
    -->
   <div class="HomePage">
		<div class="location">
			<div class="location-text fl">
				<img class="location-img fl" src="../../images/ProjectManager/screening.png" />
				<p class="fr">项目筛选</p>
			</div>
			<img class="biaotibg fl" src="../../images/home/biaotibg.png" />
		</div>
		<div class="IssuedNotice-box">
			<div class="search-box">
				<div class="fl">
					<input name="search" class="search" id="searchRoleVal" type="text" autocomplete="off" v-model="search"/>
					<input class="btn" type="button" value="搜索" @click="searchTodo"/>
				</div>
			</div>
		</div>
		<div class="PressRelease-list">
				<table>
					<thead>
						<tr>
							<th class="width140">项目名称</th>
							<th class="width140">发布基地</th>
							<th class="width100">发布时间</th>
							<th class="width80">项目类型</th>
              <th class="width80">项目详情</th>
              <th class="width80">审核状态</th>
              <th class="width80">项目状态</th>
							<th class="width110">操作</th>
							<!--<th class="table-text-th2">备注</th>-->
						</tr>
					</thead>
					<tbody>
            <tr v-if="projectList.length == 0">
              <td colspan="8" class="center">暂无数据！</td>
            </tr>
            <tr v-for="project in projectList">
              <td :title="project.name"><span class="show-oneline-table">{{project.name}}</span></td>
              <td :title="project.areasName"><span class="show-oneline-table">{{project.areasName}}</span></td>
              <td>{{formatData(project.releaseTime)}}</td>
              <td>{{project.type == 1 ? "横向项目" : "研究院项目"}}</td>
              <td><input type="button" value="查看" class="delete write" @click="projectDetails(project.id)" /></td>
              <!--<td><a target="_blank" :href="urls.baseUrl + project.demandBookUrl" class="delete" v-if="project.demandBookUrl != null && project.demandBookUrl != ''"> 查看</a></td>-->
              <td>{{auditStatus(project.screenAuditStatus)}}</td>
              <td>{{project.areasStatus == 6 || project.areasStatus == 3 ? "无效" : "有效"}}</td>
              <td>
                <template v-if="project.screenAuditStatus == 1 && (project.areasStatus == 6 || project.areasStatus == 3 ? false : true)">
                  <input type="button" value="通过" class="through pointer" @click="auditProject(project.id,2)" />|
                  <input type="button" class="through pointer" value="不通过" @click="auditModelShow(project.id)" />
                </template>
              </td>
              <!--<td>内容不符</td>-->
            </tr>
					</tbody>
				</table>
				<!--total  数据总数   size  一页多少条数据   page  当前页码    changge 返回当前选择的页码  改变一页显示条 child  返回值就是一页显示条数  -->
				<pageination :total="total" :size="size" :page="page" :changge="pageFn" @child="obtainChild"></pageination>
			</div>

     <!-- 项目详情-模态框-->
     <div v-if="projectDetailsModelShow" class="tenant-model">
       <div class="tenant-model-content">
         <header class="tenant-model-header">
           <h3>查看项目详情</h3>
           <span @click="closeModel" class="closeModel">×</span>
         </header>
         <div class="tenant-model-body">
           <div class="search-contain">
             <!--模态框内容板块-->
             <div class="rork">
               <p>基地名称：<span>{{project.areasName}}</span></p>
               <p>项目名称：<span>{{project.name}}</span></p>
               <p>项目类型：<span>{{project.type == 1 ? "横向项目" : "研究院项目"}}</span></p>
               <p>项目简介：<span>{{project.introduction}}</span></p>
               <p>项目需求说明书：<a @click="preview(project.demandBookUrl)" class="discoloration">预览</a> </p>
             </div>
           </div>
         </div>
         <!--<footer class="tenant-model-footer">
           <button class="determine" @click="closeModel">返回</button>
         </footer>-->
       </div>
     </div>

     <!-- - 不通过 退出 模态框-->
     <div v-if="auditModel" class="tenant-model">
       <div class="tenant-model-content  disagree">
         <header class="tenant-model-header">
           <h3>不通过</h3>
           <span @click="closeModel" class="closeModel">×</span>
         </header>
         <div class="tenant-model-body">
           <div class="search-contain">
             <!--		&lt;!&ndash;模态框内容板块&ndash;&gt;-->
             <form class="form-box">
             	<div class="msg">
                 <label v-if="!auditObj.screenAuditMsg&&closureAuditMsg">请输入不通过原因</label>
                 <label v-else-if="auditObj.screenAuditMsg!=null&&auditObj.screenAuditMsg.length > 100">原因最多只能输入100个字</label>
               </div>
               <div class="form-line input-required">
                 <label class="textarea-label">原因：</label>
                 <div class="input-box textarea-box">
                   <textarea name="screenAuditMsg" v-model="auditObj.screenAuditMsg"></textarea>
                 </div>
               </div>

               <div class="form-line imgbox">
                 <label class="textarea-label">附件：</label>
                 <input name="screenAuditEnclosureUrl" type="hidden" v-model="auditObj.screenAuditEnclosureUrl"/>
                 <input type="file" ref="uploadFile" accept=".txt,.rar,.zip,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.exe,image/*" @change="idFrontImg($event)" style="display: none;" />
                 <input type="button" value="上传附件" class="delete write" @click="$refs.uploadFile.click()"/>
                 <input type="button" value="删除附件" class="delete write" @click="deleteEnclosure()"  v-if="FileUpload.length"/>
                 <ul class="img-box" v-if="FileUpload.length">
                   <li v-for="item in FileUpload">{{item}}</li>
                 </ul>
               </div>
             </form>
           </div>
         </div>
         <footer class="tenant-model-footer">
           <button class="determine" @click="auditData">确定</button>
         </footer>
       </div>
     </div>
	</div>
</template>
<script src="./ProjectSelection.js"></script>

<style scoped>
	@import "ProjectSelection.css"
</style>
